package com.igor.reporting.pages.solver;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.igor.reporting.dao.solver.SolverDAO;
import com.igor.reporting.entities.solver.Solver;

public class Edit {

	@Inject
	private SolverDAO SolverDAO;

	@Property
	@Persist
	private Solver solver;

	void onActivate(Long id) {
		solver = SolverDAO.find(id);
	}

	Object onSuccess() {
		SolverDAO.update(solver);
		return Browse.class;
	}
}
